import request from '@/utils/request';
import { stringify } from 'qs';

const mockURL = 'http://127.0.0.1:4523/m1/4124772-0-default';

export function getFieldConfig(params) {
  return request(`/new-common/quickQueryLabel/getByCode?${stringify(params)}`, {
    method: 'GET',
    // baseURL: mockURL,
  });
}

export function updateFieldConfig(params) {
  return request(`/new-common/quickQueryLabel/saveOrUpdate`, {
    method: 'POST',
    data: params,
    // baseURL: mockURL,
  });
}

export function getUniqueDetail(params) {
  return request(`/new-oms-search/searchOrder/getUniqueCode?${stringify(params)}`, {
    method: 'Get',
    // baseURL: mockURL,
  });
}

//根据物流单号和快递公司ID获取物流轨迹
export async function getOrderDynamic(params) {
    return request(`/blade-logistics/expressF3/trail?${stringify(params)}`);
  }

//根据订单id局部刷新查询订单信息--系统订单
export async function searchOrderByIds(params) {
	return request(`/new-oms-search/searchOrder/findIds`, {
		method: 'post',
		data: params,
	});
}

//根据订单id查询库存
export async function searchAvailableNumsById(params) {
	return request(`/new-oms-search/searchOrder/findId?${stringify(params)}`);
}

//根据订单id局部刷新查询订单信息--历史订单
export async function searchHistoryOrderByIds(params) {
    return request(`/new-oms-search/esOrder/query/historyOrder/goodsInfo?${stringify(params)}`);
  }


export function queryWarehouseList() {
  return request(`/zjf-wms/kx/warehouse/selectList`);
}
	
//根据订单id局部刷新查询订单信息-打单发货
export async function searchOrderShipByIds(params) {
	return request(`/new-oms-search/searchOrder/hotFindIds`, {
		method: 'post',
		data: params,
	});
}